﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Frame.Lib.Data;

namespace Frame.Lib.Core.Config
{

    public partial class SysConfigInfo : EntityBase
    {
        public override string GetTableName()
        {
            return "s_Config";
        }
        public override string GetInsertSql()
        {
            return "insert into s_Config ( [ID], [Config]) values ( @ID, @Config)";
        }
        public override string GetUpdateSql()
        {
            return "update s_Config set  [Config] = @Config where ID = @ID";
        }
        /// <summary>
        /// 
        /// </summary>
        public String ID
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String Config
        {
            get;
            set;
        }
        public override void SetValue(string key, object value)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    this.ID = (String)value;
                    break;
                case "config":
                    this.Config = (String)value;
                    break;
            }
        }
        public override object GetValue(string key)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    return this.ID;
                case "config":
                    return this.Config;
                default:
                    return null;
            }
        }
    }

}
